package com.risk.management.service;

import com.risk.management.entity.RiskAttachment;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;

public interface RiskAttachmentService {
    /**
     * 上传风险附件
     * @param riskId 风险ID
     * @param file 上传的文件
     * @param uploadBy 上传者
     * @return 附件信息
     */
    RiskAttachment uploadAttachment(Long riskId, MultipartFile file, String uploadBy);
    
    /**
     * 获取风险的所有附件
     * @param riskId 风险ID
     * @return 附件列表
     */
    List<RiskAttachment> getAttachmentsByRiskId(Long riskId);
    
    /**
     * 根据ID获取单个附件
     * @param id 附件ID
     * @return 附件信息
     */
    RiskAttachment getAttachmentById(Long id);
    
    /**
     * 删除附件
     * @param attachmentId 附件ID
     * @return 是否删除成功
     */
    boolean deleteAttachment(Long attachmentId);
} 